package com.maiyuren.fishkit.ui.components.dict

import android.annotation.SuppressLint
import androidx.compose.runtime.Composable
import com.maiyuren.fishkit.ui.components.FishTab


@SuppressLint("UnrememberedMutableState")
@Composable
fun DictGroupPage(id: String, vm: FishDictViewModel, cfgKey: String = "main") {
    var group = vm.groupData[id]
    if (group == null) {
        group = FishDictViewModel.DictGroupInner(id = id, cfgKey = cfgKey, vm = vm)
        vm.groupData[id] = group
    }
    FishTab(index = group.currTabIndex, delegate = group.tabDelegate, showHeader = false)
}